package com.methods;

/**
 * Circle 类
 * 2017/8/20.
 * @author Erik
 * @version 0.1
 * @since JDK1.8
 * @see com.methods.Shape
 */
public class Circle extends Shape{
    private double r;

    public Circle(){}
    public Circle(double r)     {    this.setR(r);  }
    public void setR(double r)  {    this.r = r;    }

    public double getR()        {   return this.r;  }

    public void area(){
       System.out.println( "圆的面积为 "+3.14*this.getR()*this.getR());
    }

}
